package com.forum.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.Api;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.apache.commons.beanutils.BeanUtils;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.lang.reflect.InvocationTargetException;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *考试记录表
 * @author 张继成
 * @since 2023-12-31
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("examrecordtab")
public class ExamrecordtabEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    public ExamrecordtabEntity() {

    }

    public ExamrecordtabEntity(T t) {
        try {
            BeanUtils.copyProperties(this, t);
        } catch (IllegalAccessException | InvocationTargetException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }
    /**
     * 主键
     */
    @TableId
    private Long id;

    /**
     * 创建时间
     */
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat
    private Date addtime;

    /**
     * 用户id
     */
    @TableField("UserId")
    private Long userid;

    /**
     * 用户名
     */
    @TableField("UserName")
    private String username;

    /**
     * 模拟考试Id
     */
    @TableField("PaperId")
    private Long paperid;

    /**
     * 模拟考试科目名称
     */
    @TableField("PaperName")
    private String papername;

    /**
     * 试题id
     */
    @TableField("quertionid")
    private Long questionid;

    /**
     * 试题名称
     */
    @TableField("QuertionName")
    private String questionname;

    /**
     * 选项Josn字符流
     */
    @TableField("Options")
    private String options;

    /**
     * 分值
     */
    @TableField("Score")
    private Long score;

    /**
     * 正确答案
     */
    @TableField("Answer")
    private String answer;

    /**
     * 答案解析
     */
    @TableField("Analysis")
    private String analysis;

    /**
     * 试题得分
     */
    @TableField("MyScore")
    private Long myscore;

    /**
     * 考生答案
     */
    @TableField("MyAnswer")
    private String myanswer;


}
